import axios from 'axios'
const BASE_URL = "https://api.bilibili.com"
const DEFAULT_TIME = 10000

export function request(config) {
    const instance = axios.create({
        baseURL: BASE_URL,
        timeout: DEFAULT_TIME
    })
    return instance(config)
}

const OTHER_BASE_URL ="https://member.bilibili.com"
export function requestOther(config) {
    const instance = axios.create({
        baseURL: OTHER_BASE_URL,
        timeout: DEFAULT_TIME
    })
    return instance(config)
}
const LIVE_BASE_URL ="https://api.live.bilibili.com"
export function requestLive(config) {
    const instance = axios.create({
        baseURL: LIVE_BASE_URL,
        timeout: DEFAULT_TIME
    })
    return instance(config)
}
const MUSIC_BASE_URL = "https://api.5288z.com/weixin/musicapi.php"
export function requestMusic(config) {
    const instance = axios.create({
        baseURL:MUSIC_BASE_URL,
        timeout:DEFAULT_TIME
    })
    return instance(config)
}